package com.blog.cmrpersonalblog.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 通知设置实体类
 */
@Data
@TableName("notification_settings")
public class NotificationSettings {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 关注通知开关 0-关闭 1-开启
     */
    @TableField("follow_enabled")
    private Integer followEnabled;

    /**
     * 点赞通知开关 0-关闭 1-开启
     */
    @TableField("like_enabled")
    private Integer likeEnabled;

    /**
     * 评论通知开关 0-关闭 1-开启
     */
    @TableField("comment_enabled")
    private Integer commentEnabled;

    /**
     * 回复通知开关 0-关闭 1-开启
     */
    @TableField("reply_enabled")
    private Integer replyEnabled;

    /**
     * @提及通知开关 0-关闭 1-开启
     */
    @TableField("mention_enabled")
    private Integer mentionEnabled;

    /**
     * 系统通知开关 0-关闭 1-开启
     */
    @TableField("system_enabled")
    private Integer systemEnabled;

    /**
     * 收藏通知开关 0-关闭 1-开启
     */
    @TableField("collect_enabled")
    private Integer collectEnabled;

    /**
     * 免打扰模式 0-关闭 1-开启
     */
    @TableField("do_not_disturb_enabled")
    private Integer doNotDisturbEnabled;

    /**
     * 免打扰开始时间
     */
    @TableField("do_not_disturb_start")
    private LocalTime doNotDisturbStart;

    /**
     * 免打扰结束时间
     */
    @TableField("do_not_disturb_end")
    private LocalTime doNotDisturbEnd;

    /**
     * 通知聚合开关 0-关闭 1-开启
     */
    @TableField("notification_aggregation_enabled")
    private Integer notificationAggregationEnabled;

    /**
     * WebSocket推送开关 0-关闭 1-开启
     */
    @TableField("websocket_enabled")
    private Integer websocketEnabled;

    /**
     * 邮件通知开关 0-关闭 1-开启
     */
    @TableField("email_notification_enabled")
    private Integer emailNotificationEnabled;

    /**
     * 关注邮件通知 0-关闭 1-开启
     */
    @TableField("email_follow_enabled")
    private Integer emailFollowEnabled;

    /**
     * 评论邮件通知 0-关闭 1-开启
     */
    @TableField("email_comment_enabled")
    private Integer emailCommentEnabled;

    /**
     * 回复邮件通知 0-关闭 1-开启
     */
    @TableField("email_reply_enabled")
    private Integer emailReplyEnabled;

    /**
     * @提及邮件通知 0-关闭 1-开启
     */
    @TableField("email_mention_enabled")
    private Integer emailMentionEnabled;

    /**
     * 系统邮件通知 0-关闭 1-开启
     */
    @TableField("email_system_enabled")
    private Integer emailSystemEnabled;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 开关状态常量
     */
    public static final int DISABLED = 0;
    public static final int ENABLED = 1;
}

